<?php
namespace Home\Controller;
use Think\Controller;

// 开发者：杨晓杰，
// 邮箱：2902468225@qq.com 


// 企业职位需求操作
class WorkController extends Controller {
	private $dbName='work';
	// 职位列表页面
	public function listPage(){
		tag('func');
		if(I('get.key'))$where['work_name']=array('like','%'.I('get.key').'%');
		$where['is_show']=1;
		$all=M($this->dbName)->where($where)->order('update_time desc')->select();
		$data=R('Myfunc/Myfunc/pageDeal',array('data'=>$all));
		$this->assign('data',$data);
		// dump($data);
		R('Page/workList');
	}
	// 职位详情页面
	public function detail(){
		tag('func');
		$where['work_id']=I('get.work_id');
		$where['is_show']=1;
		$data=M($this->dbName)->join('__CAMPANY__ ON __WORK__.cam_id = __CAMPANY__.id')->where($where)->field('work_id,work_name,cam_id,work_min_salary,work_max_salary,tswc_work.intro,num,tswc_work.create_time,name,logo')->find();
		$this->assign('data',$data);
		// dump($data);
		R('Page/workDetail');
	}
}